//
//  imageTransfrom.h
//  tcpoctest
//
//  Created by gump on 11/15/12.
//  Copyright (c) 2012 gump. All rights reserved.
//

#ifndef tcpoctest_imageTransfrom_h
#define tcpoctest_imageTransfrom_h

@interface UIImage (Category)

- (UIImage*)transformWidth:(CGFloat)width
					height:(CGFloat)height;
@end
@implementation UIImage (Category)

- (UIImage*)transformWidth:(CGFloat)width
					height:(CGFloat)height {
    
    UIGraphicsBeginImageContext(CGSizeMake(width, height));
    [self drawInRect:CGRectMake(0, 0, width, height)];
    UIImage *result = UIGraphicsGetImageFromCurrentImageContext();
    UIGraphicsEndImageContext();
    
	return result;
}

@end

#endif
